#! /bin/bash

export LANG=en_US.UTF-8

TEMP=$(ps axu | grep flume | grep "Dflume.monitoring.port=" | grep -v grep | grep $1)

if [[ "$TEMP" == "" ]]
then
	echo "tcp        0      0 :::0"
	exit
fi

TEMP=$(echo $TEMP | awk -F 'Dflume.monitoring.port=' '{print $2}' | awk -F ' ' '{print $1}')
echo "tcp        0      0 :::$TEMP"
